package cn.tedu.cs.Mapper;

import cn.tedu.cs.entity.banner;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.boot.Banner;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Mapper
public interface BannerMapper {

    @Select("select * from banner")
    List<banner> select();

    @Insert("insert into banner values(null,#{url})")
    void insert(String url);

    @Delete("delete from banner where id=#{id}")
    void deleteById(int id);

    @Select("select url from banner where id=#{id}")
    String selectById(int id);
}
